Skip to content

SANDBOX-808: update kube & openshift dependencies to 4.17#462

Merged
rsoaresd merged 12 commits intocodeready-toolchain:masterfrom
rsoaresd:openshift_4_17_api
Mar 13, 2025
Merged

SANDBOX-808: update kube & openshift dependencies to 4.17#462
rsoaresd merged 12 commits intocodeready-toolchain:masterfrom
rsoaresd:openshift_4_17_api

Conversation

@rsoaresd
Copy link
Copy Markdown
Contributor

@rsoaresd rsoaresd commented Feb 17, 2025

Description

Update dependencies

Tool/Library Current Version Updates to Version
Golang 1.21 1.22
Operator SDK 1.36 1.38
k8s.io/* v0.29.2 v0.30.1
controller-runtime v0.17.3 v0.18.4
controller-tools v0.12.0 v0.15.0

Note

Operator SDK will be updated in the next set of PRs along with toolchain-cicd and operators update

Changes in k8s.io/kube-openapi/cmd/openapi-gen

  • flag --output-dir deprecated
  • flag --output-dir is now required
  • flag --output-file-base is now --output-file
  • flag --output-package is now --output-pkg

Issue ticket number and link

SANDBOX-808

Note

snyk reports a lot of vulnerabilities regarding go 1.22. From snyk's source, it seems all FPs. For more info, check this Slack thread

Checks

  1. Did you run make generate target? yes

  2. Did make generate change anything in other projects (host-operator, member-operator)? yes

  3. In case of new CRD, did you the following? N/A

  4. In case other projects are changed, please provides PR links.

Copy link
Copy Markdown
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🚀

Thanks for taking care of this 🙏


* Go version 1.21.x (1.21.13 or higher) - download for your development environment https://golang.org/dl/[here].
* Operator SDK v1.36.0 - download for your development environment https://v1-36-x.sdk.operatorframework.io/docs/installation/#install-from-github-release[here]
* Go version 1.22.x (1.22.12 or higher) - download for your development environment https://golang.org/dl/[here].
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor - if you keep 1.22.11 in go.mod you'll need to update here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for noticing!! I was trying different versions to check if the vulns would lower down. But I will keep it in 1.22.12. It seems to be all FPs. For more info, check this Slack thread

module github.com/codeready-toolchain/api

go 1.21
go 1.22.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just curious if it should be 1.22 instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I put 1.22 and run go mod tidy, it automatically adds .0 and the toolchain

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexeykazakov From what i understand go 1.22 is still a valid version (reference here) but go1.22 < go1.22.0.
"A module’s go line must declare a version greater than or equal to the go version declared by each of the modules listed in require statements." (ref here )
So i'm guessing one of the dependencies have a go version higher than go.122
hope it helps

module github.com/codeready-toolchain/api

go 1.21
go 1.22.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readme, its mentioned 1.22.12 or higher, so it doesnt make sense to have 1.22.0 here.. ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to figure out if we could remove toolchain from the go.mod, but I reverted to included now:

go 1.22.0

toolchain go1.22.12

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my understanding , why toolchain go1.22.12 is being added when we run go mod tidy?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fbm3307 Go 1.21 introduced the toolchain directive, which allows specifying the minimum Go toolchain version required for your module. While not new in 1.22, it's essential to ensure this directive aligns with your project's requirements, especially when upgrading. That's why it is being added.
Checkout toolchain directive doc here. I also found go directive doc informative

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation !

@sonarqubecloud
Copy link
Copy Markdown

@rsoaresd rsoaresd merged commit 4e3c414 into codeready-toolchain:master Mar 13, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants